<template>
<!-- 空白处右键 -->
 <ul
      class="el-dropdown-menu el-popper blankmenubar"
      @click="menuBarClick"
      @mouseleave="menuBarLeave"
      id="blank_menubar"
      style="display: none;"
    >
      <li class="el-dropdown-menu__item" @click="btnAddSingle">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-jiedian"></use>
        </svg>
        <span class="pl-15">添加节点</span>
      </li>
      <li class="el-dropdown-menu__item" @click="btnQuickAddNode">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-add-rd"></use>
        </svg>
        <span class="pl-15">快速添加</span>
      </li>
    </ul>
</template>

<script>
import * as d3 from "d3";

export default {
  props: {
    data: Object
  },
  data() {
    return {

    };
  },
  components: {

  },
  methods: {
    btnAddSingle(){
      this.$emit("btnAddSingle");
    },
    btnQuickAddNode(){
      this.$emit("btnQuickAddNode");
    },
    menuBarClick() {
      d3.select("#blank_menubar").style("display", "none");
    },
    menuBarLeave() {
      d3.select("#blank_menubar").style("display", "none");
    },
  }
};
</script>
<style>

</style>
